/* @(#)GSOrderViewAction.java    
 *
 * Project: BUS
 *
 * Modify Information:
 * =============================================================================
 *   Author       Date       Description
 *   ------------ ---------- ---------------------------------------------------
 *   Simonyi Peng 2006-2-12    建立
 *
 * Copyright Notice:
 * =============================================================================
 *    Copyright (c) 2001-2006 Beijing HiTRUST Technology Co., Ltd. 1808 Room, 
 *        Science & Technology Building, No. 9 South Street, Zhong Guan Cun, 
 *        Haidian District, Beijing ,100081, China All rights reserved.
 *
 *    This software is the confidential and proprietary information of
 *        Beijing HiTRUST Technology Co., Ltd. ("Confidential Information").
 *        You shall not disclose such Confidential Information and shall use it
 *        only in accordance with the terms of the license agreement you entered
 *        into with HiTRUST.
 *
 * Warning:
 * =============================================================================
 * 
 */
package com.hitrust.gs.action;

import java.util.ArrayList;

import javax.servlet.http.HttpServletRequest;
import com.hitrust.gs.lib.GSBaseConstants;
import com.hitrust.gs.lib.GSLogWriter;
import com.hitrust.gs.service.GSBaseAction;
import com.hitrust.gs.service.GSBaseForm;
import com.hitrust.gs.util.exception.GSException;
import com.hitrust.gs.vo.GSOrderManufactureVO;
import com.hitrust.gs.vo.GSOrderVO;
import com.hitrust.gs.bean.GSOperatorBean;
import com.hitrust.gs.bean.GSOrderBean;
import com.hitrust.gs.business.GSOrderDeptInfoProcessor;
import com.hitrust.gs.business.GSOrderProcessor;
import com.hitrust.gs.form.GSOrderSaveForm;
import java.lang.reflect.Method;

/**
 * @author simonyi
 * 
 * 订单保存
 * 
 * TODO To change the template for this generated type comment go to Window -
 * Preferences - Java - Code Style - Code Templates
 */
public class GSOrderViewAction extends GSBaseAction {

    public String execute(GSBaseForm aForm) throws Exception {
        String orderId = aForm.getRequest().getParameter("orderId");
        String viewType = aForm.getRequest().getParameter("viewtype");
        GSOrderProcessor processor = new GSOrderProcessor();
        try {
            ArrayList arylist = processor.getOrderDetail_(orderId);
            GSOrderBean tBean = processor.selectOrderByCode(orderId);

            if (viewType != null) {
                aForm.getRequest().setAttribute("viewtype", viewType);
            }
            aForm.getRequest().setAttribute("bean", tBean);
            aForm.getRequest().setAttribute("arylist", arylist);
            return GSBaseConstants.FORWARD_SUCCESS;
        } catch (GSException e) {
            GSLogWriter.error(this, e.getMessage());
            aForm.getRequest().setAttribute("action", "A100101.do");
            throw e;
        }

    }
}
